
package com.avocado.base.dto.role;


import com.avocado.base.validator.role.RoleEditCodeValidation;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@EqualsAndHashCode(callSuper = true)
@Data
@RoleEditCodeValidation(field1 = "id", field2 = "code")
public class RoleEditDto extends RoleDto{

	@NotNull(message ="操作失败,id不能为空!")
	@Min(value = 1L)
	@Max(value = Long.MAX_VALUE)
	private Long id;

	@NotBlank(message = "操作失败,代码不能为空!")
	@NotNull(message ="操作失败,代码不能为空!")
	private String code;
	


}
